﻿using Core.Framework.Model.Common;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Business
{
    /// <summary>
    /// Http管道通用数据
    /// </summary>
    public abstract class BaseHttpPipelineInfo
    {
        /// <summary>
        /// 客户端信息
        /// </summary>
        protected ApiClientInfo iClientInfo;

        /// <summary>
        /// 项目信息
        /// </summary>
        protected ApiProjectInfo iProjectInfo;

        /// <summary>
        /// 请求头信息
        /// </summary>
        protected IHeaderDictionary header;

        public BaseHttpPipelineInfo(IHttpContextAccessor iHttpContextAccessor)
        {
            this.iClientInfo = (ApiClientInfo)iHttpContextAccessor.HttpContext.Items["ClientInfo"];
            this.iProjectInfo = (ApiProjectInfo)iHttpContextAccessor.HttpContext.Items["ApiProjectInfo"];
            this.header = iHttpContextAccessor.HttpContext.Request.Headers;
        }
    }
}
